#ifndef _MARIO_H_
#define _MARIO_H_

#include <d3dx9.h>

#include "sprite.h"
#include "movable.h"
#include "objects.h"
#include "bullet.h"
#include "QuadTree.h"
#include "mushroom.h"
#include "star.h"
#include "jumpingCoin.h"
#include "pieceBrick.h"
#include "flag.h"


extern CJumpingCoin *jumpingCoin;
extern CMushroom * mushroom;
extern CStar * star;
extern CPieceBrick *pa1, *pa2, *pa3, *pa4;
extern CPieceBrick *pb1, *pb2, *pb3, *pb4;

class CMario: public CMovable
{
public:
	CMario();
	CSprite* MarioBitmap;
	LPD3DXSPRITE _SpriteHandler;
	~CMario();
	

	CBullet * bul, *bul2;

	int isRunning;
	int highest;
	int isShootingTime;
	int immu,blend;
	int immuTime;
	int havingStarTime;
	int came,inHouse;
	int lifeLeft;

	virtual void Update(int t);
	virtual void lvUp();
	virtual void lvDown();
	virtual void LoadResources(LPDIRECT3DDEVICE9 d3ddv);
	virtual void Move(int way,int t);
	virtual void RenderFrame(LPDIRECT3DDEVICE9 d3ddv, int t);
	void Stop(int t);
	void Slip();
	void Jump();
	void SitDown(int);
	void StandUp();
	void JumpShort();
	void Shoot();
	void CheckItem();
	virtual void Die();
	void Finish();
	void ComeIn();
	void NewStart();
	void NextLife();
};
#endif